package com.tusuo.stds.util.validator;

import android.text.TextUtils;
import android.widget.EditText;

import com.andreabaccega.formedittextvalidator.Validator;

/**
 * @author J.Huang
 * @version 1.0
 *
 */

public class RewardNumberValidator extends Validator {

    public RewardNumberValidator(String _customErrorMessage) {
        super(_customErrorMessage);
    }

    @Override
    public boolean isValid(EditText et) {
        String inputMoneyStr = et.getText().toString().trim();

        if (!TextUtils.isEmpty(inputMoneyStr)) {
            int inputMoney = Integer.parseInt(inputMoneyStr);
            return (inputMoney > 0 && inputMoney < 201);
        }else {
            return false;
        }
    }
}
